18/57

# hdfs.exists

Verifies that a file exists in HDFS.

Usage

    hdfs.exists(
            dfs.id)

Arguments

dfs.id

  The name of a file in HDFS. The file name can include a path that is either absolute or relative to the current path.

Usage Notes

If this function returns `TRUE`, then you can attach the data and use it in a `hadoop.run` function. You can also use this function to validate an HDFS identifier and ensure that the data exists.

Return Value

`TRUE` if the identifier is valid and the data exists, or `FALSE` if the object is not found

See Also

`is.hdfs.id`

Example

This example shows that the `ontime_R` file exists.

    R> hdfs.exists("ontime_R")
    [1] TRUE